#include <iostream>
#include <stdlib.h>
#include <time.h>

using namespace std;

void posNeg()
{
    int ARRAY_SIZE = 20;

    int arr[ARRAY_SIZE];
    for(int i = 0; i < ARRAY_SIZE; i++ )
    {
        arr[i] = rand() % 11 - 5;
        cout << arr[i] << "  ";
    }
    int countPositive = 0;
    int countNegative = 1;

    for(int i = 0; i < ARRAY_SIZE; i++)
    {
        if(arr[i] > 0)
            countPositive++;
        else if(arr[i] < 0)
            countNegative++;
    }

    cout << endl <<endl;
    cout << "Count of positive numbers: " << countPositive << endl;
    cout << "Count of negative numbers: " << countNegative << endl;
    cout << "The count of positive numbers is ";
    if(countPositive > countNegative)
        cout << "greater than";
    else if(countPositive < countNegative)
        cout << "less than";
    else
        cout << "equal to";
    cout << " the count of negative numbers";
}

int main()
{
    int timeNow = time(NULL);
    srand(timeNow);
    posNeg();
    return 0;
}
